﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Models.Account.ReportModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    账户统计
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <table class="table" width="100%">
    <% if (this.ViewData.ModelState.IsValid) 
       { %>
            <tr class="th">
                <th colspan="6" align="left">
                    [<%=Model.Serch.LoginName %>]账户金额
                </th>
            </tr>
            <tr>
                <td align="right">
                    可用:
                </td>
                <td align="right">
                    <%=Model.Account.Balance.ToString("F")%>
                </td>
                <td align="right">
                    充值:
                </td>
                <td align="right">
                    <%=Model.Account.AddMoney.ToString("F")%>
                </td>
                <td align="right">
                    提款:
                </td>
                <td align="right">
                    <%=Model.Account.TackMoney.ToString("F")%>
                </td>
            </tr>
            <tr>
                <td align="right">
                    冻结:
                </td>
                <td align="right">
                    <%=Model.Account.FreezeMoney.ToString("F")%>
                </td>
                <td align="right">
                    购彩返点:
                </td>
                <td align="right">
                    <%=Model.Account.BackMoney.ToString("F")%>
                </td>
                <td align="right">
                    下级返点:
                </td>
                <td align="right">
                    <%=Model.Account.BackMoney_Child.ToString("F")%>
                </td>
            </tr>
            <tr>
                <td align="right">
                    购彩:
                </td>
                <td align="right">
                    <%=Model.Account.BuyLottery.ToString("F")%>
                </td>
                <td align="right">
                    购彩中奖:
                </td>
                <td align="right">
                    <%=Model.Account.WinMoney.ToString("F")%>
                </td>
                <td align="right">
                    下级返奖:
                </td>
                <td align="right">
                    <%=Model.Account.WinMoney_Child.ToString("F")%>
                </td>
            </tr>
        <%}else{ %>
            <tr><td><%=Html.ValidationSummary() %></td></tr>
        <% }%>
        </table>
        <p/>
        <% Html.BeginForm(new { ReturnUrl = Request["ReturnUrl"], act = Request["act"], cont = Request["cont"], arst = Request["arst"] }); %>
        <table class="table" width="100%">
            <tr class="th">
                <th colspan="3" align="left">
                    搜索条件(只能查找<%=Model.MimSerchEndTime.ToShortDateString() %>至现在之间的数据)
                </th>
            </tr>
            <tr>
                <td>
                    <label for="Serch_StartTime">
                        时间:</label>
                    <%=Html.TextBoxFor(p => p.Serch.StartTime, new { @class = "text80", onclick = "WdatePicker()" })%>
                </td>
                <td>
                    <label for="Serch_StartTime">
                        至:</label>
                    <%=Html.TextBoxFor(p => p.Serch.EndTime, new { @class = "text80", onclick = "WdatePicker()" })%>
                </td>
                <td>
                    <input type="submit" value="查找" />
                </td>
            </tr>
        </table>
        <%=Html.HiddenFor(p=>p.PageSize) %>
        <% Html.EndForm(); %>
        <p />
        <table class="table" width="100%">
            <tr class="th">
                <th>日期</th><th>充值</th><th>提款</th><th>购彩</th><th>返点</th><th>下级返点</th><th>中奖</th><th>下级返奖</th><th>盈利</th>
            </tr>
            <% if(Model.SumCount>0){
          foreach (var item in Model.Reports)
          {%>
            <tr>
                <td>
                    <%=string.Format("{0}-{1}-{2}",item.Year,item.Month,item.Day) %>
                </td>
                <td align="right">
                    <%=item.SumAddMoney.Value.ToString("F") %>
                </td>
                <td align="right">
                    <%=item.SumTackMoney.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=item.SumPlayMoney.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=item.SumBackMoney.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=item.SumBackMoney_Child.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=item.SumWinMoney.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=item.SumWinMoney_Child.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=(item.SumBackMoney + item.SumBackMoney_Child + item.SumWinMoney + item.SumWinMoney_Child - item.SumPlayMoney).Value.ToString("F")%>
                </td>
            </tr>
            <% } %>
            <tr>
                <td>
                    <font color="red">合计</font>
                </td>
                <td align="right">
                    <%=Model.SumReport.SumAddMoney.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=Model.SumReport.SumTackMoney.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=Model.SumReport.SumPlayMoney.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=Model.SumReport.SumBackMoney.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=Model.SumReport.SumBackMoney_Child.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=Model.SumReport.SumWinMoney.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%=Model.SumReport.SumWinMoney_Child.Value.ToString("F")%>
                </td>
                <td align="right">
                    <%= ((Model.SumReport.SumBackMoney + Model.SumReport.SumBackMoney_Child + Model.SumReport.SumWinMoney + Model.SumReport.SumWinMoney_Child) - Model.SumReport.SumPlayMoney).Value.ToString("F")%>
                </td>
            </tr>
            <tr>
                <td colspan="9">
                    <%=Html.Pager(Model.Page, Model.PageSize, Model.SumCount, "Page", Url.Route(new { Model.Serch, Model.PageSize, ReturnUrl = Request["ReturnUrl"], act = Request["act"], cont = Request["cont"], arst = Request["arst"] }), "PageSize")%>
                </td>
            </tr>
            <%}else{ %>
            <tr>
                <td colspan="9">
                    无记录！
                </td>
            </tr>
            <%} %>
        </table>
        <%if (Request["ReturnUrl"] != null)
      {%>
        <a class="a_blue" href='<%=Request["ReturnUrl"] %>'>&gt;&gt;返回</a>
        <%} %>
    </div>
</asp:Content>
